demos: Fix build failure
authorBastien Nocera <hadess@hadess.net>
Wed, 27 Jul 2016 17:13:31 +0000 (19:13 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 29 Jul 2016 15:02:50 +0000 (11:02 -0400)
gtk+/demos/gtk-demo/css_blendmodes.c: In function ‘update_css_for_blend_mode’:
gtk+/demos/gtk-demo/css_blendmodes.c:49:26: error: format not a string literal, argument types not checked [-Werror=format-nonliteral]
                          blend_mode);
                          ^~~~~~~~~~

https://bugzilla.gnome.org/show_bug.cgi?id=769236

demos/gtk-demo/css_blendmodes.c

index 4ce383685a9ac8dc1cd7b4ba2304c64a5b10ff61..dc41399959508f502f8f0eb84355be15f4cb7c0f 100644 (file)
@@ -34,6 +34,8 @@ struct {
   { NULL }
 };
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
 static void
 update_css_for_blend_mode (GtkCssProvider *provider,
                            const gchar    *blend_mode)
@@ -53,6 +55,7 @@ update_css_for_blend_mode (GtkCssProvider *provider,
   g_bytes_unref (bytes);
   g_free (css);
 }
+#pragma GCC diagnostic pop
 
 static void
 row_activated (GtkListBox     *listbox,